#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Generic;
using Cephei.QL.Math;
using Cephei.QL.Termstructures;
using Cephei.QL;
namespace Cephei.QL.Processes
{
     // <summary> 
	// ! This class describes the stochastic volatility process governed by \f[ \begin{array}{rcl} dS(t, S)  &=& \mu S dt + \sqrt{v} S dW_1 \\ dv(t, S)  &=& (\omega + (\beta + \alpha * q_{2} + \gamma * q_{3} - 1) v) dt + (\alpha \sigma_{12} + \gamma \sigma_{13}) v dW_1 + \sqrt{\alpha^{2} (\sigma^{2}_{2} - \sigma^{2}_{12}) + \gamma^{2} (\sigma^{2}_{3} - \sigma^{2}_{13}) + 2 \alpha \gamma (\sigma_{23} - \sigma_{12} \sigma_{13})} v dW_2 \ \ N = normalCDF(\lambda) \\ n &=& \exp{-\lambda^{2}/2} / \sqrt{2 \pi} \\ q_{2} &=& 1 + \lambda^{2} \\ q_{3} &=& \lambda n + N + \lambda^2 N \\ \sigma^{2}_{2} = 2 + 4 \lambda^{4} \\ \sigma^{2}_{3} = \lambda^{3} n + 5 \lambda n + 3N + \lambda^{4} N + 6 \lambda^{2} N -\\lambda^{2} n^{2} - N^{2} - \lambda^{4} N^{2} - 2 \lambda n N - 2 \lambda^{3} nN - 2 \lambda^{2} N^{2} \                 \ \sigma_{12} = -2 \lambda \\ \sigma_{13} = -2 n - 2 \lambda N \\ \sigma_{23} = 2N + \sigma_{12} \sigma_{13} \\ \end{array} \f]  \ingroup processes
	// </summary>
    [Guid ("AD6D2572-9D3E-46fa-9453-D01C51DF0E65"),ComVisible(true)]
	public interface IGJRGARCHProcess : Cephei.QL.IStochasticProcess
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        
		 Double Alpha {get;}
        
		 Double Beta {get;}
        
		 Double DaysPerYear {get;}
        
		 Cephei.QL.Termstructures.IYieldTermStructure DividendYield {get;}
        
		 Double Gamma {get;}
        
		 Double Lambda {get;}
        
		 Double Omega {get;}
        
		 Cephei.QL.Termstructures.IYieldTermStructure RiskFreeRate {get;}
        
		 Cephei.QL.IQuote S0 {get;}
        
		 UInt64 Size {get;}
        
		 Double Time(DateTime d);
        
		 Double V0 {get;}
    }

    // <summary> 
	// ! This class describes the stochastic volatility process governed by \f[ \begin{array}{rcl} dS(t, S)  &=& \mu S dt + \sqrt{v} S dW_1 \\ dv(t, S)  &=& (\omega + (\beta + \alpha * q_{2} + \gamma * q_{3} - 1) v) dt + (\alpha \sigma_{12} + \gamma \sigma_{13}) v dW_1 + \sqrt{\alpha^{2} (\sigma^{2}_{2} - \sigma^{2}_{12}) + \gamma^{2} (\sigma^{2}_{3} - \sigma^{2}_{13}) + 2 \alpha \gamma (\sigma_{23} - \sigma_{12} \sigma_{13})} v dW_2 \ \ N = normalCDF(\lambda) \\ n &=& \exp{-\lambda^{2}/2} / \sqrt{2 \pi} \\ q_{2} &=& 1 + \lambda^{2} \\ q_{3} &=& \lambda n + N + \lambda^2 N \\ \sigma^{2}_{2} = 2 + 4 \lambda^{4} \\ \sigma^{2}_{3} = \lambda^{3} n + 5 \lambda n + 3N + \lambda^{4} N + 6 \lambda^{2} N -\\lambda^{2} n^{2} - N^{2} - \lambda^{4} N^{2} - 2 \lambda n N - 2 \lambda^{3} nN - 2 \lambda^{2} N^{2} \                 \ \sigma_{12} = -2 \lambda \\ \sigma_{13} = -2 n - 2 \lambda N \\ \sigma_{23} = 2N + \sigma_{12} \sigma_{13} \\ \end{array} \f]  \ingroup processes Factory
	// </summary>
   	[ComVisible(true)]
    public interface IGJRGARCHProcess_Factory // : Collection_Factory<IGJRGARCHProcess, ICell<IGJRGARCHProcess>>
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        
	    IGJRGARCHProcess Create (Cephei.QL.Termstructures.IYieldTermStructure riskFreeRate, Cephei.QL.Termstructures.IYieldTermStructure dividendYield, Cephei.QL.IQuote s0, Double v0, Double omega, Double alpha, Double beta, Double gamma, Double lambda, Microsoft.FSharp.Core.FSharpOption<Double> daysPerYear, Microsoft.FSharp.Core.FSharpOption<QL.Processes.GJRGARCHProcess.DiscretizationEnum> d);
    }
}

